// Copyright (c) 2007 Robin Boerdijk. All rights reserved.
//
// This software is licensed under the terms of the Microsoft Reciprocal License as described 
// in the file LICENSE.txt, which you should have received as part of this distribution. The 
// license terms are also available at http://www.opensource.org/licenses/ms-rl.html.

#ifndef wtk_DC_h_included
#define wtk_DC_h_included

#include "wtk/win32.h"

namespace wtk
{
	class DC
	{
	public:

		operator HDC() { return m_dcHandle; }

		SIZE GetTextBoxSize(const wchar_t *text);

	protected:

		typedef HDC (*GetDCFunction)(HWND);

		DC(HWND windowHandle, GetDCFunction getDC);

		virtual ~DC();

	private:

		HWND m_windowHandle;

		HDC m_dcHandle;
	};
}

#endif